# Contributor: V.Krishn <vkrishn4@gmail.com>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=avfs
pkgver=1.1.5
pkgrel=2
pkgdesc="A Virtual File System for looking into archives"
url="https://avf.sourceforge.net/"
arch="all"
license="GPL-2.0-or-later"
# scripts are mostly perl, some bash
depends="bash perl"
makedepends="zlib-dev bzip2-dev fuse-dev zstd-dev xz-dev"
subpackages="$pkgname-dev $pkgname-libs"
source="https://downloads.sourceforge.net/project/avf/avfs/$pkgver/avfs-$pkgver.tar.bz2
	fix-PATH_MAX.patch
	"

build() {
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--enable-fuse \
		--enable-library \
		--with-system-zlib \
		--with-system-bzlib \
		--with-xz \
		--with-zstd \
		--prefix=/usr \
		--disable-static
	make
}

check() {
	make check
}

package() {
	make DESTDIR="$pkgdir" install
}

sha512sums="
03e9abbda17d7976f9c6e4f8a426ff0b85f626ba2942cb2ec17aff3239476d6de385d7d709d7f0b23e31fbde5bcf131e512d38354f78f7fdc04d4b6d0d593e1b  avfs-1.1.5.tar.bz2
281d36f65652a265781e305647a4c1c8f03b851ba458a0b7d9f36119f5489f3b16337019da2b8521695c9bb5cee7ee01ef0a040453c27e1f82f51d858f4940b5  fix-PATH_MAX.patch
"
